﻿namespace io.gitee.sprinsogns
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Program program = new Program();
            int result;
            program.Sum(10, 20, out result);
            Console.WriteLine(result);
            int result1 = 0;
            program.Sum1(10, 20, ref result1);
            Console.WriteLine(result1);
        }

        void Sum(int a,int b,out int result)
        {
            result = a + b;
        }

        void Sum1(int a,int b,ref int result)
        {
            result=a + b;
        }
    }
}